# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Artem Vorotnikov <artem@vorotnikov.me>

_gemname=rspec-support
pkgname=ruby-${_gemname}
pkgver=3.12.0
pkgrel=1
pkgdesc='Common code needed by the other RSpec gems. Not intended for direct use'
url='https://github.com/rspec/rspec-support'
arch=('any')
license=('MIT')
depends=('ruby' 'ruby-rdoc')
options=('!emptydirs')
source=(https://rubygems.org/downloads/${_gemname}-${pkgver}.gem)
noextract=(${_gemname}-${pkgver}.gem)
sha512sums=('89d18f75d83805b48375f663bba20ad5994fa0ab97a6aabfc007881ccc681d182035af8c46a9da8b3ee3ff2d9516e7836180c65eb3a7a8eea68eb5a11a881dc1')

package() {
  local _gemdir="$(gem env gemdir)"
  gem install --ignore-dependencies --no-user-install -i "${pkgdir}${_gemdir}" -n "${pkgdir}/usr/bin" ${_gemname}-${pkgver}.gem
  install -Dm 644 "${pkgdir}${_gemdir}/gems/${_gemname}-${pkgver}/LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  install -Dm 644 "${pkgdir}${_gemdir}/gems/${_gemname}-${pkgver}/README.md" "${pkgdir}/usr/share/doc/${pkgname}/README"
  rm "${pkgdir}/${_gemdir}/cache/${_gemname}-${pkgver}.gem"
}

# vim: ts=2 sw=2 et:
